﻿@model kmaraszkiewicz.Models.Job

@{
    ViewBag.Title = "Edit";
}

<h2>Edit</h2>

@using (Html.BeginForm()) {
    @Html.ValidationSummary(true)

    <fieldset>
        <legend>Job</legend>

        @Html.HiddenFor(model => model.JobId)

        <div class="editor-field">
            @Html.TextBoxFor(model => model.AuthorDescriptionId, new { @type = "hidden", @Value = Model.AuthorDescriptionId.ToString() })
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.CompanyName)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.CompanyName)
            @Html.ValidationMessageFor(model => model.CompanyName)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.ComapnyLinkUrl)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.ComapnyLinkUrl)
            @Html.ValidationMessageFor(model => model.ComapnyLinkUrl)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.JobPosition)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.JobPosition)
            @Html.ValidationMessageFor(model => model.JobPosition)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.DateFrom)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.DateFrom)
            @Html.ValidationMessageFor(model => model.DateFrom)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.DateTo)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.DateTo)
            @Html.ValidationMessageFor(model => model.DateTo)
        </div>

        <p>
            <input type="submit" value="Save" />
        </p>
    </fieldset>
}

<div>
    @Html.ActionLink("Back to List", "Index")
</div>

@section Scripts {
    @Scripts.Render("~/bundles/jqueryval")
    <script type="text/javascript" >
        $(document).ready(function () {
            $("#DateFrom").datepicker()
            $("#DateTo").datepicker()
        })
    </script>
}
